﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EntityFramework.Helper.Searcher
{
    /// <summary>
    /// Defines a contract to create a entity criteria.
    /// </summary>
    /// <typeparam name="E">The entity type.</typeparam>
    public interface ICriteria<E> where E : System.Data.Objects.DataClasses.EntityObject
    {
        #region Properties

        /// <summary>
        /// Gets the current criteria entity object.
        /// </summary>
        E CurrentEntityObject
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the criteria changed properties.
        /// </summary>
        Dictionary<string, object> ChangedProperties
        {
            get;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Gets a criteria object to be used on the search.
        /// </summary>
        /// <returns>Criteria object.</returns>
        E GetCritireiaObject();

        #endregion
    }
}
